package com.wry.spring.spi.use;

import com.wry.spring.spi.Search;

import java.util.Iterator;
import java.util.ServiceLoader;

/**
 * <h1>  </h1>
 *
 * @author wry
 * @since 2025.04.07
 */
public class Main {
    public static void main(String[] args) {
        ServiceLoader<Search> load = ServiceLoader.load(Search.class);
        Iterator<Search> iterator = load.iterator();
        while (iterator.hasNext()) {
            Search next = iterator.next();
            next.search("1");
        }
    }
}
